Content publishing method and user equipment

ABSTRACT

Embodiments of the present invention provide a content publishing method and a user equipment. The content publishing method includes: obtaining, by a first user equipment supporting a D2D function, a resource for broadcasting information of the first user equipment. The method also includes broadcasting, by the first user equipment, the information of the first user equipment on the obtained resource, so that a second user equipment obtains and sends the information of the first user equipment to a network-side device to set up a connection with the first user equipment, where the second user equipment supports the D2D function and is matched with the first user equipment.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.14/228,882, filed on Mar. 28, 2014, which is a continuation ofInternational Application No. PCT/CN2012/082575, filed on Oct. 8, 2012.The International Application claims priority to Chinese PatentApplication No. 201110297621.7, filed on Sep. 30, 2011. All of theafore-mentioned patent applications are hereby incorporated by referencein their entireties.

TECHNICAL FIELD

Embodiments of the present invention relate to the field ofcommunications technologies, and in particular, to a content publishingmethod and a user equipment.

BACKGROUND

A device to device (D2D) communications technology may implementservices and data applications in a local self-organizing (ad-hoc)network and short-range communication.

To improve spectrum utilization, a D2D system and a cellular systemshare same resources. To access the cellular system, a D2D terminal inthe D2D system needs to comply with the time and timeslot of thecellular system. The D2D system may support services such as informationsharing, gaming, social services, mobile advertising, and so on.

The D2D terminal in the D2D system has a function of sensing radioresources, that is, the D2D terminal actively senses an externalenvironment, and actively manages and configures resources according toa sensed result, not requiring control and allocation of an evolvedpacket core network (EPC) or an evolved universal mobiletelecommunications system terrestrial radio access network (E-UTRAN),and with no authentication and certification of an operator network,which is unfavorable for proper allocation of resources and secureoperation of a network. In addition, in a content publishing aspect, itis impossible to solve problems about how a matched terminal obtainsquality of service (QoS) information and how guaranteed services can beprovided.

SUMMARY

Embodiments of the present invention provide a content publishing methodand a user equipment, so that a matched terminal can obtain QoSinformation, and guaranteed services can be provided for device todevice (D2D) communication.

An embodiment of the present invention provides a content publishingmethod. A first user equipment supporting a D2D function obtains aresource for broadcasting information of the first user equipment. Theinformation of the first user equipment includes one or a combination ofan identifier, service information, a service code, and applicationlayer service information of the first user equipment. The first userequipment broadcasts the information of the first user equipment on theobtained resource, so that a second user equipment supporting the D2Dfunction obtains the information of the first user equipment. Afterbeing matched with the first user equipment successfully, the first userequipment sends the information of the first user equipment to anetwork-side device to set up a connection with the first userequipment.

An embodiment of the present invention further provides a first userequipment that supports a device to device D2D function. An obtainingmodule is configured to obtain a resource for broadcasting informationof the first user equipment. The information of the first user equipmentincludes one or a combination of an identifier, service information, aservice code, and application layer service information of the firstuser equipment. A broadcasting module is configured to broadcast theinformation of the first user equipment on the resource obtained by theobtaining module, so that a second user equipment supporting the D2Dfunction obtains the information of the first user equipment. Afterbeing matched with the first user equipment successfully, thebroadcasting module is configured to send the information of the firstuser equipment to a network-side device to set up a connection with thefirst user equipment.

In the embodiments of the present invention, after a first userequipment supporting a D2D function obtains a resource for broadcastinginformation of the first user equipment, the first user equipmentbroadcasts the information of the first user equipment on the obtainedresource. The information of the first user equipment includes one or acombination of an identifier, service information, a service code, andapplication layer service information of the first user equipment. Thena second user equipment supporting the D2D function may obtain theinformation of the first user equipment and after being matched with thefirst user equipment successfully, send the information of the firstuser equipment to a network-side device to set up a connection with thefirst user equipment. In this way, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of the present invention, and persons ofordinary skill in the art may still derive other drawings from theseaccompanying drawings without creative efforts.

FIG. 1 is a flowchart of an embodiment of a content publishing methodaccording to the present invention;

FIG. 2 is a flowchart of another embodiment of a content publishingmethod according to the present invention;

FIG. 3 is a flowchart of another embodiment of a content publishingmethod according to the present invention;

FIG. 4 is a flowchart of another embodiment of a content publishingmethod according to the present invention;

FIG. 5 is a schematic structural diagram of an embodiment of a firstuser equipment according to the present invention;

FIG. 6 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention; and

FIG. 7 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

To make the objectives, technical solutions, and advantages of theembodiments of the present invention more comprehensible, the followingclearly describes the technical solutions in the embodiments of thepresent invention with reference to the accompanying drawings in theembodiments of the present invention. Apparently, the describedembodiments are merely a part rather than all of the embodiments of thepresent invention. All other embodiments obtained by persons of ordinaryskill in the art based on the embodiments of the present inventionwithout creative efforts shall fall within the protection scope of thepresent invention.

FIG. 1 is a flowchart of an embodiment of a content publishing methodaccording to the present invention. As shown in FIG. 1, the contentpublishing method may include the following steps.

Step 101: A first user equipment supporting a D2D function obtains aresource for broadcasting information of the first user equipment, wherethe information of the first user equipment includes one or acombination of an identifier, service information, a service code, andapplication layer service information of the first user equipment.

The identifier may be: one or a combination of a physical identifier, anon-access stratum identifier (NAS ID), and an access stratum identifier(AS ID). For example, the physical identifier may be a specific codesequence such as an international mobile subscriber identity (IMSI). TheNAS ID may be a serving temporary mobile subscriber identity (s-TMSI) oran old GUTI. The AS ID may be a cell radio network temporary identifier(C-RNTI) or a D-RNTI (namely, a radio network temporary identifier(RNTI) used for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be non-access stratum (NAS) informationrequired by the user equipment for constructing a connection setuprequest message of a service, and include QoS information and so on.

Step 102: The first user equipment broadcasts the information of thefirst user equipment on the obtained resource, so that a second userequipment supporting the D2D function obtains the information of thefirst user equipment and after being matched with the first userequipment successfully, sends the information of the first userequipment to a network-side device to set up a connection with the firstuser equipment.

Specifically, the broadcasting, by the first user equipment, theinformation of the first user equipment on the obtained resource, maybe: broadcasting, by the first user equipment, the information of thefirst user equipment on the obtained resource periodically in adiscontinuous transmission mode.

In an implementation manner of this embodiment, the obtaining, by afirst user equipment supporting a D2D function, a resource forbroadcasting information of the first user equipment, may be: obtaining,by the first user equipment, resources that are allocated in advance bya serving base station of a cell where the first user equipment iscurrently located to user equipments supporting the D2D function in thecell and are used for broadcasting the information of the userequipments, where the resources are broadcast by the serving basestation through a broadcast message; and selecting, by the first userequipment by automatic search or measurement, a resource whoseinterference level is lower than a predetermined threshold, from theresources allocated in advance by the serving base station. Optionally,the allocation manner of the serving base station is semi-static.

In another implementation manner of this embodiment, the obtaining, by afirst user equipment supporting a D2D function, a resource forbroadcasting information of the first user equipment, may be: selecting,by the first user equipment according to interference levels ofsub-resources and position information of the sub-resources that arebroadcast by a serving base station of a cell where the first userequipment is currently located, a sub-resource whose interference levelis lower than a predetermined threshold, from the sub-resourcesbroadcast by the serving base station, where the sub-resources areobtained after the serving base station divides resources that areallocated in advance by the serving base station to user equipmentssupporting the D2D function in the cell and are used for broadcastingthe information of the user equipments.

In another implementation manner of this embodiment, the obtaining, by afirst user equipment supporting a D2D function, a resource forbroadcasting information of the first user equipment, may be setting up,by the first user equipment, a connection with a serving base station ofa cell where the first user equipment is currently located, andtriggering the serving base station to allocate a resource to the firstuser equipment to broadcast the information of the first user equipment.Specifically, the setting up, by the first user equipment, a connectionwith a serving base station of a cell where the first user equipment iscurrently located, may be: sending, by the first user equipment, a radioresource control connection setup message or a radio resource controlconnection setup complete message to the serving base station, where theradio resource control connection setup message or the radio resourcecontrol connection setup complete message carries an information elementindicating that the first user equipment supports the D2D function,and/or a value of a setup cause information element in the radioresource control connection setup message is D2D connection or D2Dcontent publishing.

Further, after the first user equipment sets up the connection with theserving base station of the cell where the first user equipment iscurrently located, the first user equipment may maintain a commonconnected state or a long discontinuous reception mode in a connectedstate; in addition, before the first user equipment leaves the cell, thefirst user equipment may notify the serving base station of recyclingthe resource that is allocated to the first user equipment and used forbroadcasting the information of the first user equipment.

In this implementation manner, in the process of setting up, by thefirst user equipment, the connection with the serving base station ofthe cell where the first user equipment is currently located, the firstuser equipment may further send the service information of the firstuser equipment, or the service information and application layer serviceinformation of the first user equipment, or the service information andservice code of the first user equipment, or the service information,application layer service information, and service code of the firstuser equipment to the serving base station or an evolved packet corenetwork (EPC) entity device. In this case, if the information broadcastby the first user equipment includes the application layer serviceinformation and/or service code of the first user equipment, but doesnot include the service information of the first user equipment, thesecond user equipment may send the application layer service informationand/or service code of the first user equipment to the serving basestation or the EPC entity device, receive the service information of thefirst user equipment that is sent by the serving base station or the EPCentity device according to the application layer service informationand/or service code of the first user equipment, generate a non-accessstratum message according to the service information of the first userequipment, and send the non-access stratum message to a network-sidedevice to set up a connection with the first user equipment.

Alternatively, the second user equipment may send a connection setuprequest message to the serving base station, where the connection setuprequest message carries the application layer service information and/orservice code of the first user equipment, so that after receiving theconnection setup request message sent by the second user equipment, theserving base station obtains the service information of the first userequipment locally or from the EPC entity device according to theapplication layer service information and/or service code of the firstuser equipment carried in the connection setup request message, adds theservice information of the first user equipment to the connection setuprequest message sent by the second user equipment, and sends theconnection setup request message to a core network device after theservice information of the first user equipment is added.

In an implementation manner of this embodiment, sending the informationof the first user equipment to a network-side device to set up aconnection with the first user equipment may be: when the informationbroadcast by the first user equipment includes the service informationof the first user equipment, generating, by the second user equipment, anon-access stratum message according to the service information of thefirst user equipment, and sending the non-access stratum message to thenetwork-side device to set up a connection with the first userequipment.

In another implementation manner of this embodiment, before the firstuser equipment broadcasts the information of the first user equipment onthe obtained resource, the first user equipment may further send theapplication layer service information of the first user equipment to aservice management server, and receive the service informationcorresponding to the first user equipment and the service code allocatedby the service management server to the first user equipment, where theservice information is found by the service management server accordingto the application layer service information of the first userequipment. In this case, the sending the information of the first userequipment to the network-side device to set up the connection with thefirst user equipment may be: when the information broadcast by the firstuser equipment includes the application layer service information and/orservice code of the first user equipment, but does not include theservice information of the first user equipment, the second userequipment sends the application layer service information and/or servicecode of the first user equipment to the service management server,receives the service information of the first user equipment sent by theservice management server according to the application layer serviceinformation and/or service code of the first user equipment, generates anon-access stratum message according to the service information of thefirst user equipment, and sends the non-access stratum message to thenetwork-side device to set up a connection with the first userequipment.

In this embodiment, the cell where the first user equipment is currentlylocated includes a target cell to which the first user equipment ishanded over, or a cell where the first user equipment is powered on.

In the above embodiment, after the first user equipment supporting theD2D function obtains the resource for broadcasting the information ofthe first user equipment, the first user equipment broadcasts theinformation of the first user equipment on the obtained resource, wherethe information of the first user equipment includes one or acombination of an identifier, service information, a service code, andapplication layer service information of the first user equipment; andthen a second user equipment supporting the D2D function may obtain theinformation of the first user equipment and after being matched with thefirst user equipment successfully, send the information of the firstuser equipment to a network-side device to set up a connection with thefirst user equipment. In this way, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 2 is a flowchart of another embodiment of a content publishingmethod according to the present invention. As shown in FIG. 2, thecontent publishing method may include the following steps.

Step 201: A base station allocates in advance resources to all UEssupporting a D2D function in a cell where the base station is located,where the resources are used for broadcasting information of the UEs,and broadcasts the resources through a broadcast message.

In this embodiment, the base station may be an evolved NodeB (eNB).Definitely, the embodiment of the present invention is not limitedthereto. The embodiment of the present invention does not limit the formof the base station. The information includes one or a combination of anidentifier, service information, a service code, and application layerservice information of the UE supporting the D2D function.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI; the NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by a UE forconstructing a connection setup request message of a service, andinclude QoS information and so on.

Step 202: When a UE 1 supporting the D2D function is handed over to thecell where the base station is located, or powered on in the cell wherethe base station is located, the UE 1 obtains the resources according tothe broadcast message sent by the base station.

In this embodiment, when the UE 1 supporting the D2D function is handedover to the cell where the base station is located, or powered on in thecell where the base station is located, the UE 1 may receive thebroadcast message sent by the base station. The UE 1 may obtain,according to the broadcast message, the resources that are allocated inadvance by the base station to all D2D UEs in the cell where the basestation is located, where the resources are used for broadcastinginformation of the UEs.

Step 203: The UE 1 selects by automatic search or measurement, aresource whose interference level is lower than a predeterminedthreshold, from the resources allocated in advance by the base station,thereby avoiding interference from other UEs supporting the D2D functionor interference to other UEs supporting the D2D function.

In this case, on the Uu interface, a radio resource control idle(RRC_Idle) state is maintained between the UE 1 and the base station.

Step 204: The UE 1 broadcasts information of the UE 1 on the selectedresource.

In this embodiment, the information of the UE 1 broadcast by the UE 1 isnot further described herein. For details, reference may be made to theexample in step 201.

Specifically, the UE supporting the D2D function has discontinuousreception (DRX) and discontinuous transmission (DTX) features.

Therefore, in this embodiment, the manner of broadcasting information ofthe UE 1 by the UE 1 may be a DTX manner: broadcasting information ofthe UE 1 on the selected resource in a discontinuous transmission cycle(DTX-Cycle).

In this embodiment, after the UE 1 broadcasts the information of the UE1, other UEs supporting the D2D function than the UE 1 in the cell wherethe UE 1 is located have an opportunity to detect the UE 1.

Step 205: When a UE 2 supporting the D2D function in the cell where theUE 1 is located knows, by using a sensing technology or by searching forand measuring other UEs supporting the D2D function than the UE 2 in thecell, that a possible matched UE 1 exists, a matching process isstarted.

Specifically, the UE 2 may search, in the DRX manner, for informationbroadcast by other UEs supporting the D2D function than the UE 2 in thecell where the UE 2 is located, on some specific resources, and afterknowing that a possible matched UE 1 exists, receive information of theUE 1 broadcast by the UE 1; or the UE 2 may also receive, in an eventtrigger manner, information of the UE 1 broadcast by the UE 1, forexample, when a user has a specific requirement, a receiving action istriggered through a man-machine interface; or an application layertriggers a receiving action according to a requirement profile (profile)previously customized by the user. Definitely, the UE 2 may alsoreceive, by using a combination of the DRX and event trigger manners,the information of the UE 1 broadcast by the UE 1.

Step 206: After the UE 1 is matched with the UE 2 successfully, the UE 2sends the information of the UE 1 to a network-side device to set up aconnection with the UE 1.

Specifically, in an implementation manner of this embodiment, when theinformation of the UE 1 broadcast by the UE 1 includes serviceinformation of the UE 1, the UE 2 may generate a NAS message accordingto the service information of the UE 1, and send the NAS message to thenetwork-side device to set up a connection with the UE 1.

In another implementation manner of this embodiment, before step 204,the UE 1 may send the application layer service information of the UE 1to a service management server, and receive the service informationcorresponding to the UE 1 and the service code allocated by the servicemanagement server to the UE 1, where the service information is found bythe service management server according to the application layer serviceinformation of the UE 1. When the information broadcast by the UE 1includes the application layer service information and/or service codeof the UE 1, but does not include the service information of the UE 1,the UE 2 may send the application layer service information and/orservice code of the UE 1 to the service management server, receive theservice information of the UE 1 sent by the service management serveraccording to the application layer service information and/or servicecode of the UE 1, generate a NAS message according to the serviceinformation of the UE 1, and send the NAS message to the network-sidedevice to set up a connection with the UE 1.

According to the above embodiment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 3 is a flowchart of another embodiment of a content publishingmethod according to the present invention. As shown in FIG. 3, thecontent publishing method may include the following steps.

Step 301: A base station divides resources that are allocated in advanceby the base station to UEs supporting a D2D function in a cell where thebase station is located and are used for broadcasting information of theUEs, into sub-resources.

In this embodiment, the base station may be an eNB. Definitely, theembodiment of the present invention is not limited thereto. Theembodiment of the present invention does not limit the form of the basestation. The information includes one or a combination of an identifier,service information, a service code, and application layer serviceinformation of the UEs supporting the D2D function.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI; the NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by a UE forconstructing a connection setup request message of a service, andinclude QoS information and so on.

Specifically, the base station may divide the resources intosub-resources according to the granularity of a time domain, frequencydomain, and/or space domain.

Step 302: The base station broadcasts interference levels of thesub-resources and position information of the sub-resources through abroadcast message.

In this embodiment, the base station may update the interference levelsand position information of the sub-resources according to theinformation measured and reported by UEs in the cell where the basestation is located.

Step 303: When a UE 1 supporting the D2D function is handed over to thecell where the base station is located, or powered on in the cell wherethe base station is located, the UE 1 selects a sub-resource whoseinterference level is lower than a predetermined threshold, from thesub-resources.

Specifically, when the UE 1 supporting the D2D function is handed overto the cell where the base station is located, or powered on in the cellwhere the base station is located, the UE 1 may receive a broadcastmessage sent by the base station, and further the UE 1 may readinterference levels and position information of sub-resources in thebroadcast message. Then the UE 1 may select, according to theinterference levels and position information of the sub-resources in thebroadcast message, a sub-resource whose interference level is lower thana predetermined threshold, thereby avoiding interference from other UEssupporting the D2D function or interference to other UEs supporting theD2D function. For example, assuming that the interference levels of thesub-resources divided by the base station include three levels: high,medium, and low, the UE 1 may select a sub-resource whose interferencelevel is medium or low, that is, select the sub-resource whoseinterference level is lower than the high level.

In this case, on the Uu interface, a radio resource control idle (RadioResource Control Idle, RRC_Idle for short below) state is maintainedbetween the UE 1 and the base station.

Step 304 to step 306 are the same as step 204 to step 206, and are notfurther described herein.

According to the above embodiment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 4 is a flowchart of another embodiment of a content publishingmethod according to the present invention. As shown in FIG. 4, thecontent publishing method may include:

Step 401: In a process of setting up a connection with a network, a UE 1supporting a D2D function sends application layer service information ofthe UE 1 to a service management server.

Specifically, when the UE 1 supporting the D2D function provides aservice, the UE 1 sends application layer service information of the UE1 to the service management server in the process of setting up aconnection with the network.

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

Step 402: The service management server finds, according to theapplication layer service information sent by the UE 1, serviceinformation corresponding to the UE 1, allocates a service code to theUE 1, and sends the service information corresponding to the UE 1 andthe service code allocated to the UE 1 to the UE 1.

The service information may be NAS information required by the UE 1 forconstructing a connection setup request message of a service, andinclude QoS information and so on.

In this embodiment, steps 401 and 402 are optional steps.

Step 403: When the UE 1 is handed over to a cell or powered on in acell, the UE 1 sets up a connection with a serving base station of thecell, and triggers the serving base station to allocate a resource tothe UE 1 to broadcast information of the UE 1.

In this embodiment, the serving base station may be an eNB. Definitely,the embodiment of the present invention is not limited thereto. Theembodiment of the present invention does not limit the form of theserving base station.

Specifically, when the UE 1 is handed over to the cell or is powered onin the cell, the UE 1 may set up a connection with the serving basestation of the cell, and obtain, from the serving base station, aresource for broadcasting information of the UE 1, no matter whether areal service of the UE 1 exists. In a specific implementation, thesetting up, by the UE 1, a connection with the serving base station ofthe cell may be: sending, by the UE 1, an RRC connection setup messageor an RRC connection setup complete message to the serving base station,where the RRC connection setup message or the RRC connection setupcomplete message carries an information element indicating that the UE 1supports the D2D function, and/or a value of a setup cause informationelement in the RRC connection setup message is D2D connection or D2Dcontent publishing.

Step 404: In the process of setting up a connection with the servingbase station, the UE 1 sends the service information of the UE 1, or theservice information and application layer service information of the UE1, or the service information and service code of the UE 1, or theservice information, application layer service information, and servicecode of the UE 1 to the serving base station or an evolved packet corenetwork (Evolved Packet Core, EPC for short below) entity device.

In this embodiment, step 404 is an optional step.

Step 405: On the Uu interface, after the UE 1 sets up a connection withthe serving base station, the UE 1 maintains a common connected state ora long DRX mode (long DRX mode) in a connected state.

In addition, in this embodiment, when the UE 1 leaves the cell where theserving base station is located, the UE 1 needs to notify the servingbase station of recycling the resource that is allocated to the UE 1 andused for broadcasting the information of the UE 1.

Step 406: The UE 1 broadcasts the information of the UE 1 on theresource that is allocated by the serving base station to the UE 1 andused for broadcasting the information of the UE 1.

In this embodiment, the information of the UE 1 broadcast by the UE 1may include one or a combination of an identifier, service information,a service code, and application layer service information of the UE 1.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI; the NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by the UE 1 forconstructing a connection setup request message of a service, andinclude QoS information and so on.

Specifically, the UE supporting the D2D function has DRX and DTXfeatures.

Therefore, in this embodiment, the manner of broadcasting information ofthe UE 1 by the UE 1 may be a DTX manner: broadcasting, in adiscontinuous transmission cycle (DTX-Cycle), information of the UE 1 onthe resource that is allocated by the serving base station to the UE 1.

In this embodiment, after the UE 1 broadcasts the information of the UE1, other UEs supporting the D2D function than the UE 1 in the cell wherethe UE 1 is located have an opportunity to detect the UE 1.

Step 407: When a UE 2 supporting the D2D function in the cell where theUE 1 is located knows, by using a sensing technology or by searching forand measuring other UEs supporting the D2D function than the UE 2 in thecell, that a possible matched UE 1 exists, a matching process isstarted.

Specifically, the UE 2 may search, in the DRX manner, for informationbroadcast by other UEs supporting the D2D function than the UE 2 in thecell where the UE 2 is located, on some specific resources, and afterknowing that a possible matched UE 1 exists, the UE 2 receivesinformation of the UE 1 broadcast by the UE 1; or the UE 2 may alsoreceive, in an event trigger manner, information of the UE 1 broadcastby the UE 1, for example, when a user has a specific requirement, areceiving action is triggered through a man-machine interface; or anapplication layer triggers a receiving action according to a requirementprofile (profile) previously customized by the user. Definitely, the UE2 may also receive, by using a combination of the DRX and event triggermanners, the information of the UE 1 broadcast by the UE 1.

Step 408: After the UE 1 is matched with the UE 2 successfully, the UE 2sends the information of the UE 1 to a network-side device to set up aconnection with the UE 1.

Specifically, in an implementation manner of this embodiment, when theinformation of the UE 1 broadcast by the UE 1 includes serviceinformation of the UE 1, the UE 2 may generate a NAS message accordingto the service information of the UE 1, and send the NAS message to thenetwork-side device to set up a connection with the UE 1.

In another implementation manner of this embodiment, if step 401 andstep 402 exist, when the information broadcast by the UE 1 includes theapplication layer service information and/or service code of the UE 1,but does not include the service information of the UE 1, the UE 2 maysend the application layer service information and/or service code ofthe UE 1 to the service management server, receive the serviceinformation of the UE 1 sent by the service management server accordingto the application layer service information and/or service code of theUE 1, generate a NAS message according to the service information of theUE 1, and send the NAS message to the network-side device to set up aconnection with the UE 1.

In another implementation manner of this embodiment, if step 404 exists,when the information broadcast by the UE 1 includes the applicationlayer service information and/or service code of the UE 1, but does notinclude the service information of the UE 1, the UE 2 may send theapplication layer service information and/or service code of the UE 1 tothe serving base station or EPC entity device, receive the serviceinformation of the UE 1 sent by the serving base station or EPC entitydevice according to the application layer service information and/orservice code of the UE 1, generate a NAS message according to theservice information of the UE 1, and send the NAS message to thenetwork-side device to set up a connection with the UE 1.

Alternatively, the UE 2 may send a connection setup request message tothe serving base station, where the connection setup request messagecarries the application layer service information and/or service code ofthe UE 1, so that after receiving the connection setup request messagesent by the UE 2, the serving base station obtains the serviceinformation of the UE 1 locally or from the EPC entity device accordingto the application layer service information and/or service code of theUE 1 carried in the connection setup request message, adds the serviceinformation of the UE 1 to the connection setup request message sent bythe UE 2, and sends the connection setup request message to a corenetwork device after the service information of the UE 1 is added.

According to the above embodiment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

A person of ordinary skill in the art may understand that all or part ofthe steps in the method according to the embodiments can be implementedby hardware under the instruction of a program. The program may bestored in a computer readable storage medium and when the program runs,the steps in the method according to the embodiments are performed. Thestorage medium is any medium that can store program code, such as a ROM,a RAM, a magnetic disk, or an optical disc.

FIG. 5 is a schematic structural diagram of an embodiment of a firstuser equipment according to the present invention. The first userequipment in this embodiment may implement the procedure in theembodiment shown in FIG. 1 of the present invention, and the first userequipment supports a D2D function. As shown in FIG. 5, the first userequipment includes an obtaining module 51 and a broadcasting module 52.

The obtaining module 51 is configured to obtain a resource forbroadcasting information of the first user equipment, where theinformation of the first user equipment includes one or a combination ofan identifier, service information, a service code, and applicationlayer service information of the first user equipment.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI. The NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by the firstuser equipment for constructing a connection setup request message of aservice, and include QoS information and so on.

The broadcasting module 52 is configured to broadcast the information ofthe first user equipment on the resource obtained by the obtainingmodule 51, so that a second user equipment supporting the D2D functionobtains the information of the first user equipment and after beingmatched with the first user equipment successfully, sends theinformation of the first user equipment to a network-side device to setup a connection with the first user equipment. Specifically, thebroadcasting module 52 may broadcast the information of the first userequipment on the obtained resource periodically in a DTX mode.

In the first user equipment, after the obtaining module 51 obtains theresource for broadcasting the information of the first user equipment,the broadcasting module 52 broadcasts the information of the first userequipment on the resource obtained by the obtaining module 51, where theinformation of the first user equipment includes one or a combination ofan identifier, service information, a service code, and applicationlayer service information of the first user equipment; and then a seconduser equipment supporting the D2D function may obtain the information ofthe first user equipment and after being matched with the first userequipment successfully, send the information of the first user equipmentto a network-side device to set up a connection with the first userequipment. In this way, a matched terminal can obtain QoS information,and guaranteed services can be provided for D2D communication.

FIG. 6 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention. Different fromthe first user equipment shown in FIG. 5, in the first user equipmentshown in FIG. 6, the obtaining module 51 may include a resourceobtaining submodule 511 and a first resource selecting submodule 512; orthe obtaining module 51 may include a second resource selectingsubmodule 513; or the obtaining module 51 may include a resourceobtaining submodule 511, a first resource selecting submodule 512, and asecond resource selecting submodule 513.

The resource obtaining submodule 511 is configured to obtain resourcesthat are allocated in advance by a serving base station of a cell wherethe first user equipment is currently located to user equipmentssupporting the D2D function in the cell and are used for broadcastingthe information of the user equipments, where the resources arebroadcast by the serving base station through a broadcast message.

The first resource selecting submodule 512 is configured to select, byautomatic search or measurement, a resource whose interference level islower than a predetermined threshold, from the resources allocated inadvance by the serving base station.

The second resource selecting submodule 513 is configured to select,according to interference levels of sub-resources and positioninformation of the sub-resources that are broadcast by the serving basestation of the cell where the first user equipment is currently located,a sub-resource whose interference level is lower than a predeterminedthreshold, from the sub-resources broadcast by the serving base station,where the sub-resource is obtained after the serving base stationdivides resources that are allocated in advance by the serving basestation to user equipments supporting the D2D function in the cell andare used for broadcasting the information of the user equipments.

In this embodiment, the first user equipment may further include othermodules. A second sending module 53 is configured to send theapplication layer service information of the first user equipment to aservice management server before the broadcasting module 52 broadcaststhe information of the first user equipment. A receiving module 54 isconfigured to receive the service information corresponding to the firstuser equipment and the service code allocated by the service managementserver to the first user equipment. The service information is found bythe service management server according to the application layer serviceinformation of the first user equipment.

With the first user equipment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 7 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention. Different fromthe first user equipment shown in FIG. 6, in the first user equipmentshown in FIG. 7, the obtaining module may include a connection setupsubmodule 514, which is configured to set up a connection with a servingbase station of a cell where the first user equipment is currentlylocated, and trigger the serving base station to allocate a resource tothe first user equipment to broadcast information of the first userequipment. Specifically, the connection setup submodule 514 may send anRRC connection setup message to the serving base station, where the RRCconnection setup message carries an information element indicating thatthe first user equipment supports the D2D function, and/or a value of asetup cause information element in the radio resource control connectionsetup message is D2D connection or D2D content publishing.

Further, in this embodiment, the first user equipment may furtherinclude a number of nodules. A maintaining module 55 is configured tomaintain a common connected state or a long discontinuous reception modein a connected state after the connection setup submodule 514 sets up aconnection with the serving base station of the cell where the firstuser equipment is currently located. A notifying module is configuredto, before the first user equipment leaves the cell, notify the servingbase station of recycling the resource that is allocated to the firstuser equipment and used for broadcasting the information of the firstuser equipment. A first sending module 57 is configured to, in theprocess of setting up a connection by the connection setup submodule 514with the serving base station of the cell where the first user equipmentis currently located, send the service information of the first userequipment, or the service information and application layer serviceinformation of the first user equipment, or the service information andservice code of the first user equipment, or the service information,application layer service information, and service code of the firstuser equipment to the serving base station or an EPC entity device.

With the first user equipment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

A person skilled in the art understands that the accompanying drawingsshow merely exemplary embodiments of the present invention and themodules or procedures in the accompanying drawings are not mandatory forthe implementation of the present invention.

A person skilled in the art understands the modules of the apparatusesin the embodiments may be disposed in the apparatuses as described inthe embodiments or disposed in one or more apparatuses other than theapparatuses in the embodiments. The modules according to the aboveembodiments may be combined into one module, or split into multiplesubmodules.

Finally, it should be noted that the foregoing embodiments are merelyintended for describing the technical solutions of the present inventionrather than limiting the present invention. Although the presentinvention is described in detail with reference to the foregoingembodiments, persons of ordinary skill in the art should understand thatthey may still make modifications to the technical solutions describedin the foregoing embodiments or make equivalent replacements to sometechnical features thereof, as long as such modifications orreplacements do not cause the essence of corresponding technicalsolutions to depart from the spirit and scope of the technical solutionsof the embodiments of the present invention.

What is claimed is:
 1. A method, comprising: obtaining, by a first userequipment supporting a device to device (D2D) function, a plurality ofresources, wherein the plurality of resources are allocated in advanceby a serving base station of a cell where the first user equipment islocated, the plurality of resources are allocated to user equipmentssupporting the D2D function in the cell, and the plurality of resourcesare allocated for broadcasting information about the user equipmentssupporting the D2D function in the cell; selecting, by the first userequipment, a first resource of the plurality of resources forbroadcasting information about the first user equipment; andbroadcasting, by the first user equipment to a second user equipmentsupporting the D2D function, the information about the first userequipment on the first resource.
 2. The method according to claim 1,wherein the plurality of resources are broadcast by the serving basestation through a broadcast message.
 3. The method according to claim 1,wherein an interference level of the first resource for broadcastinginformation about the first user equipment is lower than a predeterminedthreshold.
 4. The method according to claim 1, wherein the informationabout the first user equipment comprises one or a combination of anidentifier, service information, a service code, or application layerservice information of the first user equipment.
 5. The method accordingto claim 4, wherein before broadcasting the information about the firstuser equipment on the first resource, the method further comprises:sending, by the first user equipment, the application layer serviceinformation of the first user equipment to a service management server,and receiving the service information corresponding to the first userequipment and the service code allocated by the service managementserver to the first user equipment, wherein the service information isfound by the service management server according to the applicationlayer service information of the first user equipment.
 6. The methodaccording to claim 1, wherein broadcasting the information about thefirst user equipment on the first resource comprises: broadcasting, bythe first user equipment in a discontinuous transmission mode, theinformation about the first user equipment on the first resourceperiodically.
 7. A method, comprising: allocating, by a base station toa first user equipment supporting a device to device (D2D) function, afirst resource for broadcasting information about the first userequipment to another user equipment supporting the D2D function; andsending, by the base station, an identification of the first resource tothe first user equipment, wherein the base station allocates, inadvance, a plurality of resources to user equipments supporting the D2Dfunction in a cell where the first user equipment is located, whereinthe plurality of resources are used for broadcasting information aboutthe user equipments supporting the D2D function in the cell where thefirst user equipment is located, and the first resource for broadcastinginformation about the first user equipment is selected by the first userequipment from the plurality of resources.
 8. The method according toclaim 7, wherein the plurality of resources are broadcast by the basestation through a broadcast message.
 9. The method according to claim 7,wherein an interference level of the first resource for broadcastinginformation about the first user equipment is lower than a predeterminedthreshold.
 10. A device, applied to first user equipment supporting adevice to device (D2D) function, the device comprising: a processor; anda non-transitory computer readable storage medium storing a program tobe executed by the processor, the program including instructions for:obtaining a plurality of resources that are allocated in advance by aserving base station of a cell where the first user equipment islocated, wherein the plurality of resources are allocated to userequipments supporting the D2D function in the cell, and the plurality ofresources are allocated for broadcasting information about the userequipments supporting the D2D function in the cell; and selecting afirst resource of the plurality of resources for broadcastinginformation about the first user equipment; and broadcasting, to asecond user equipment supporting the D2D function, the information aboutthe first user equipment on the first resource.
 11. The device accordingto claim 10, wherein the plurality of resources are broadcast by theserving base station through a broadcast message.
 12. The deviceaccording to claim 10, wherein an interference level of the firstresource for broadcasting information about the first user equipment islower than a predetermined threshold.
 13. The device according to claim10, wherein the information about the first user equipment comprises oneor a combination of an identifier, service information, a service code,or application layer service information of the first user equipment.14. The device according to claim 13, wherein the program furtherincludes instructions for: sending, before broadcasting the informationabout the first user equipment on the first resource, the applicationlayer service information of the first user equipment to a servicemanagement server; and receiving the service information correspondingto the first user equipment and the service code allocated by theservice management server to the first user equipment, wherein theservice information is found by the service management server accordingto the application layer service information of the first userequipment.
 15. The device according to claim 10, wherein broadcastingthe information about the first user equipment on the first resourcecomprises: broadcasting, in a discontinuous transmission mode, theinformation about the first user equipment on the first resourceperiodically.
 16. A device applied to a base station, the devicecomprising: a processor; and a non-transitory computer readable storagemedium storing a program to be executed by the processor, the programincluding instructions for: allocating, to a first user equipmentsupporting a device to device (D2D) function, a first resource that isused for broadcasting information about the first user equipment toanother user equipment supporting the D2D function; and sending anidentification of the first resource to the first user equipment,wherein the base station is configured to allocate, in advance, aplurality of resources to user equipments supporting the D2D function ina cell where the first user equipment is located, wherein the pluralityof resources are allocated for broadcasting information about the userequipments supporting the D2D function in the cell where the first userequipment is located, and the first resource for broadcastinginformation about the first user equipment is selected by the first userequipment from the plurality of resources.
 17. The device according toclaim 16, wherein the plurality of resources are broadcast by the basestation through a broadcast message.
 18. The device according to claim16, wherein an interference level of the first resource for broadcastinginformation about the first user equipment is lower than a predeterminedthreshold.